<%-- 
    Document   : index
    Created on : 9/12/2014, 09:03:46 PM
    Author     : -ADMIN-
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Registro</title>
<link href="estilos/registro2.css" rel="stylesheet"  type="text/css">
<!--extraemos librerias para vaalidacion -->
      <script type="text/javascript" src="Validaciones/jquery.js"></script>
    <script type="text/javascript" src="Validaciones/jquery.validate.js"></script>
    <script type="text/javascript" src="Validaciones/additional-methods.js"></script>
</head>
<body bgcolor="F0F0F0">
<div class="ayuda">
    <a  onClick="history.back()"   title="Atras"> <img  src="imgenes/atras.png" width="30px" height="30px"> </a> 
  </div>
	<div id="registro" >
    	<section>
        	<h1> Reestablecer Contraseña</h1>
        </section>
    	<form method="post" action="../Controlador" id="reestablecerClave">
            <input type="hidden" name="accion" value="reestablecerClave" />
        	<fieldset >
                <label> Correo</label>
                    <input type="email" name="txtCorreo" id="txtCorreo" required>
                <label> Nueva Clave: </label>
                    <input type="password" name="txtClave" id="txtClave" required>
                <label>Confirmar Clave: </label>
                    <input type="password" name="txtClaveConfirm" required>

                    <br>
                <input type="reset" id="botonBorrar" name="btnRegistro" value="Cancelar" onclick="history.back()">
                <input type="submit" id="boton" name="login" value="Reestablecer">
            </fieldset>
             <%
                     if(request.getParameter("msg")!= null)
                          out.print(request.getParameter("msg"));
            %>
        </form>
            
            <style type="text/css">
                        label.error{
                            color: red;
                            position: relative ;
                            
                         }

                        input:required{
                            background: rgba(243,235,235,0.5); 
                        }
                        input:required:valid{
                            background: #FF8303;
                            color: #fff;    
                        }
                         
                        input:focus:invalid{
                            background-color: #FCE1E2;
                        }
                    </style>

        <script>
            $().ready(function(){
                $("#reestablecerClave").validate({
                    rules:{
                        txtCorreo:{
                            required: true,
                        },
                        txtClave:{
                            required: true,
                            minlength: 6,
                            maxlength: 16,
                            },
                        txtClaveConfirm:{
                            required: true,
                            minlength: 6,
                            maxlength: 16,
                            equalTo: "#txtClave",
                            },
                        }, 
                        messages:{
                            txtCorreo:{
                                required:"digite un valor aqui",
                            },
                            txtClave:{
                                required: "debe ingresar la clave actual",
                                minlength: " debe contener {0} digitos minimo",
                                maxlength: " solo se permiten {0} digitos maximo",
                                },
                            txtClaveConfirm:{
                                required:"Digite la nueva contraseña ",
                                minlength: " debe contener {0} digitos minimo",
                                maxlength: " solo se permiten {0} digitos maximo",
                                 equalTo: "Contraseñas no coinciden",
                                },
                            
                        }
                    
                    });
            });
        </script>
    </div>
</body>
</html>
